<div style="text-align: center; background-color: rgb(0,0,0); color: white;">   
  choose time range
</div> 

    <% intervals.each do |int| %>
      <div class="intervals" >
        <%= aval = iws.select { |iw| iw unless (iw.oldest_scandate>Date.today.subtract_interval(int)) }
            if (int == params[:period])
              ["<b>", int, "</b>"].join
            elsif (aval.length == 0)
              int
            else
              link_to int, { :controller => 'intword', 
                             :action => 'show',
                             :id => @ids,
                             :period => int }
            end %>
     </div>
    <% end %>


